1. Field
The present invention relates to an image processing apparatus, method, and storage medium storing a computer program that causes the image processing apparatus to execute the image processing method, and more specifically, to an image processing apparatus, such as a scanner, a facsimile machine, a computer, a digital camera, and a video player, which compresses and stores input image data in a memory to reuse the image data, an image processing method performed by the image processing apparatus, and a computer-readable storage medium storing a computer program that causes the image processing apparatus to execute the image processing method.
2. Description of the Background
In an image processing apparatus such as a copier, a printer, a facsimile machine, a multifunctional device capable of performing several of the foregoing functions, or the like, in order to make clear an edge portion of a text or line drawing in an original document (hereinafter simply “document”), and to smooth the shading gradation of a halftone dot image in a photo image or the like, image area separation processing (also referred to as image characteristic detection processing) is performed on input image data including image area separation data that indicates whether the image data of the document forms a binary image portion, such as a text or line drawing (a text area), or a halftone dot image (a photograph area).
As a result, the input image data is separated into the image data and the image area separation data representing the result of the image area separation processing. On the basis of the image area separation data, characteristic correction or conversion processing, such as MTF (Modulation Transfer Function) correction (i.e., spatial filtering processing) and scanner gamma conversion, is performed on the image data in accordance with the result of the image area separation processing. The image area separation data is configured as single-bit or few-bit data. Image area determination may also include a determination of whether the image data forms a portion on an edge or a portion in a text or line width, whether the image data is chromatic or achromatic, and so forth.
Further, when a conventional image processing apparatus having an image memory produces a plurality of copies, the apparatus stores in the image memory the image data read from the document, and reads the stored image data to print out the plurality of copies. Accordingly, the number of document scanning operations for scanning the same document through a scanner unit can be reduced to one. In storing the image data in the image memory, the image data is compressed and then stored in the image memory to reduce the required memory size. In this case, if the data compression ratio is simply increased in one-way compression of the image data, any difference from the original image data is generated in the image data decompressed from the one-way compressed data, resulting in a reduction in the reliability and the fidelity of reproduction of the image data. To perform high-quality image processing, therefore, when storing the image data in the image memory, the image data prior to one-way compression is subjected to image area separation processing and then is compressed and stored in the image memory. Further, image area separation data is stored in an image area memory. When the compressed image data is read from the image memory and decompressed, the image area separation data is read from the image area memory as well. Then, on the basis of the image area separation data, characteristic correction or conversion such as MTF correction and scanner gamma conversion is performed on the decompressed image data.
According to a conventional technique, when storing the image data of the document in the image memory, image area separation processing is performed on the image data prior to compression using an image processing semiconductor integrated circuit such as an ASIC (Application Specific Integrated Circuit). The image area separation data representing the result of image area separation processing is stored in the image area memory.
Further, the image data and the image area separation data are divided into blocks both in main and sub-scanning directions in pixel matrices each including a plurality of pixels. The respective blocks of image data are compressed into fixed-length codes. Then, the compressed image data and the image area separation data are stored in a memory. Thereafter, when the compressed image data read from the memory is decompressed, the image data is converted into color component data having image expression characteristics in accordance with the content of the image area separation data read from the memory.
According to the conventional technique described above, image area separation processing is performed on the image data prior to compression to generate the image area separation data. The image area separation data and the image data are divided into blocks in predetermined pixel matrices, and the image data is compressed and stored in the memory block by block. Consequently, the actual amount of compressed image data code is unknown, preventing memory from being dynamically secured according to the amount of compressed image data code and the data size of the image area separation data during the transfer of the image data. As a result, a memory capacity having extra space needs to be prepared in advance to store the respective blocks of the compressed image data. Therefore, the conventional technique is open to improvement in the use efficiency of the memory.
In view of the above-described situation, the present disclosure provides an image processing apparatus and method capable of performing image processing with an excellent image quality by storing compressed image data and image area separation data in a memory while improving the use efficiency of the memory, and a storage medium storing a computer program that causes the image processing apparatus to execute the image processing method.